import { InputType, Field} from '@nestjs/graphql';
import { IsNotEmpty,  IsString } from 'class-validator';

@InputType()
export class LoginInput {
  @Field(type => String!, { nullable: false, description: '账号' })
  @IsString({message: '账号必须是字符类型'})
  @IsNotEmpty({ message: '账号不能为空' })
  username: string

  @Field(type => String!, { description: '账号密码' })
  @IsString({ message: '账号密码必须是字符类型' })
  @IsNotEmpty({ message: '账号密码不能为空' })
  password: string
}